﻿<!--
  
   EditorWindow.xaml
  
   Copyright (c) 2007 Mike Strobel
  f
   This source code is subject to the terms of the Microsoft Reciprocal License (Ms-RL).
   For details, see <http://www.opensource.org/licenses/ms-rl.html>.
  
   All other rights reserved.
  
  -->
<dc:RibbonWindow
  x:Class="Supremacy.Editor.EditorWindow"
  xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:dc="clr-namespace:DevComponents.WpfRibbon;assembly=DevComponents.WpfRibbon"
  xmlns:dd="clr-namespace:DevComponents.WpfDock;assembly=DevComponents.WpfDock"
  xmlns:se="clr-namespace:Supremacy.Editor"
  xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
  xmlns:mwt="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
  FocusManager.IsFocusScope="True"
  Title="Supremacy Editor"
  Width="960"
  Height="720"
  ResizeMode="CanResizeWithGrip"
  WindowStartupLocation="CenterScreen">
  <dc:RibbonWindow.Resources>
    <CollectionViewSource
      x:Key="RaceDatabaseView"
      Source="{Binding Path=EditorContext.Races, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}">
      <CollectionViewSource.SortDescriptions>
        <scm:SortDescription
          PropertyName="Name" />
      </CollectionViewSource.SortDescriptions>
    </CollectionViewSource>
    <CollectionViewSource
      x:Key="CivDatabaseView"
      Source="{Binding Path=EditorContext.Civilizations, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}">
      <CollectionViewSource.SortDescriptions>
        <scm:SortDescription
          PropertyName="ShortName" />
      </CollectionViewSource.SortDescriptions>
    </CollectionViewSource>
    <CollectionViewSource
      x:Key="BuildingDatabaseView"
      Source="{Binding Path=EditorContext.TechDatabase.BuildingDesigns, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}">
      <CollectionViewSource.SortDescriptions>
        <scm:SortDescription
          PropertyName="Name" />
      </CollectionViewSource.SortDescriptions>
    </CollectionViewSource>
    <CollectionViewSource
      x:Key="FacilityDatabaseView"
      Source="{Binding Path=EditorContext.TechDatabase.ProductionFacilityDesigns, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}">
      <CollectionViewSource.SortDescriptions>
        <scm:SortDescription
          PropertyName="Name" />
      </CollectionViewSource.SortDescriptions>
    </CollectionViewSource>
    <CollectionViewSource
      x:Key="ShipDatabaseView"
      Source="{Binding Path=EditorContext.TechDatabase.ShipDesigns, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}">
      <CollectionViewSource.SortDescriptions>
        <scm:SortDescription
          PropertyName="Name" />
      </CollectionViewSource.SortDescriptions>
    </CollectionViewSource>
    <CollectionViewSource
      x:Key="StationDatabaseView"
      Source="{Binding Path=EditorContext.TechDatabase.StationDesigns, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}">
      <CollectionViewSource.SortDescriptions>
        <scm:SortDescription
          PropertyName="Name" />
      </CollectionViewSource.SortDescriptions>
    </CollectionViewSource>
  </dc:RibbonWindow.Resources>
  <DockPanel
    x:Name="EditorContentSite"
    LastChildFill="True">
    <!--<DockPanel.LayoutTransform>
      <ScaleTransform x:Name="EditorWindowScaleTransform"
                      CenterX="0.5"
                      CenterY="0.5"
                      ScaleX="1.0"
                      ScaleY="{Binding Path=ScaleX, RelativeSource={RelativeSource Self}}" />
    </DockPanel.LayoutTransform>-->
    <dc:Ribbon
      DockPanel.Dock="Top"
      LicenseKey="DAD80300DA22"
      x:Name="EditorRibbon">
      <dc:Ribbon.ApplicationMenu>
        <dc:ApplicationMenu
          dc:Ribbon.KeyTip="F">
          <dc:ApplicationMenu.Image>
            <Image
              Source="/Resources/Component.png"
              Width="24"
              Height="24" />
          </dc:ApplicationMenu.Image>
          <!-- Application Commands -->
          <dc:ApplicationMenu.AppItems>
            <dc:ButtonDropDown
              ColorClass="ButtonWithBackground"
              Margin="6,0,0,0"
              dc:Ribbon.KeyTip="X"
              Command="se:EditorCommands.Exit"
              UseSmallImage="True"
              CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}" />
          </dc:ApplicationMenu.AppItems>
          <!-- Most Recently Used Items -->
          <dc:ApplicationMenu.MruItems>
            <TextBlock
              MinWidth="200"
              FontWeight="Bold">Game Configurations</TextBlock>
            <Separator
              Padding="0" />
            <dc:ButtonDropDown
              x:Name="StandardConfigurationButton"
              Header="Standard Configuration"
              Click="StandardConfigurationButton_Click"
              CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}"
              dc:Ribbon.KeyTip="1" />
          </dc:ApplicationMenu.MruItems>
          <!-- Document Commands etc. -->
          <dc:ButtonDropDown
            Style="{DynamicResource AppMenuCommandButton}"
            dc:Ribbon.KeyTip="N"
            Command="ApplicationCommands.New"
            CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}"
            Header="Create New Configuration" />
          <dc:ButtonDropDown
            Style="{DynamicResource AppMenuCommandButton}"
            dc:Ribbon.KeyTip="O"
            Command="ApplicationCommands.Open"
            CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}"
            Header="Open Existing Configuration" />
          <dc:ButtonDropDown
            Style="{DynamicResource AppMenuCommandButton}"
            dc:Ribbon.KeyTip="S"
            Command="ApplicationCommands.Save"
            CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}"
            Header="Save Current Configuration" />
          <dc:ButtonDropDown
            Style="{DynamicResource AppMenuCommandButton}"
            dc:Ribbon.KeyTip="A"
            Command="ApplicationCommands.SaveAs"
            CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}"
            Header="Save Current Configuration As..." />
          <Separator
            Style="{DynamicResource AppMenuSeparator}" />
          <dc:ButtonDropDown
            Style="{DynamicResource AppMenuCommandButton}"
            dc:Ribbon.KeyTip="C"
            Command="ApplicationCommands.Close"
            CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}"
            Header="Close This Configuration" />
        </dc:ApplicationMenu>
      </dc:Ribbon.ApplicationMenu>
      <dc:Ribbon.QuickAccessToolbar>
        <dc:Qat>
          <dc:ButtonDropDown
            PartVisibility="ImageOnly"
            dc:Ribbon.KeyTip="1"
            ImageSmall="/Resources/Save.png"
            Command="ApplicationCommands.Save"
            CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}" />
          <!--<dc:ButtonDropDown PartVisibility="ImageOnly"
                             dc:Ribbon.KeyTip="2"
                             Command="ApplicationCommands.Help"
                             CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}" />-->
          <dc:QatCustomizeButton />
        </dc:Qat>
      </dc:Ribbon.QuickAccessToolbar>
      <!--<dc:Ribbon.ContextGroups>
        <dc:ContextGroup Name="ContextGroup"
                         StockColor="Green"
                         FontSize="7.5pt">
          Context Group
        </dc:ContextGroup>
      </dc:Ribbon.ContextGroups>-->

      <dc:RibbonTab
        Header="Home"
        dc:Ribbon.KeyTip="H">
        <dc:RibbonBarPanel>
          <dc:RibbonBar
            Header="Clipboard"
            Name="ClipboardRibbonBar"
            ResizeOrderIndex="1"
            dc:Ribbon.KeyTip="FO">
            <dc:RibbonBar.CollapsedImage>
              <Image
                Source="/Resources/Paste32.png" />
            </dc:RibbonBar.CollapsedImage>
            <dc:ButtonDropDown
              ImagePosition="Top"
              dc:RibbonBar.MinAutoSizeHint="Medium"
              ExpandPosition="Bottom"
              InlineExpand="False"
              PopupType="Menu"
              ContentExpands="true"
              VerticalContentAlignment="Center"
              dc:Ribbon.KeyTip="V"
              Command="ApplicationCommands.Paste"
              ToolTipService.PlacementTarget="{Binding ElementName=EditorRibbon}">
              <dc:ButtonDropDown.ToolTip>
                <dc:SuperToolTip
                  Header="Paste (Ctrl+V)"
                  Footer="Press F1 for help...">
                  <TextBlock
                    TextWrapping="Wrap"
                    Width="180">Paste the contents of the Clipboard</TextBlock>
                </dc:SuperToolTip>
              </dc:ButtonDropDown.ToolTip>
              <dc:ButtonDropDown
                Role="MenuItem"
                dc:Ribbon.KeyTip="P"
                Command="ApplicationCommands.Paste" />
              <dc:ButtonDropDown
                Header="Paste Special..."
                Role="MenuItem"
                dc:Ribbon.KeyTip="S"
                IsEnabled="False">
                <dc:ButtonDropDown.Image>
                  <Image
                    Source="/Resources/PasteSpecial16.png" />
                </dc:ButtonDropDown.Image>
              </dc:ButtonDropDown>
            </dc:ButtonDropDown>
            <dc:ButtonDropDown
              dc:Ribbon.KeyTip="X"
              UseSmallImage="True"
              Command="ApplicationCommands.Cut">
              <dc:ButtonDropDown.ToolTip>
                <dc:SuperToolTip
                  Header="Cut (Ctrl+X)">
                  <TextBlock
                    TextWrapping="Wrap"
                    Width="180">Cut the selection from the document and put it on the Clipboard.</TextBlock>
                </dc:SuperToolTip>
              </dc:ButtonDropDown.ToolTip>
            </dc:ButtonDropDown>
            <dc:ButtonDropDown
              dc:Ribbon.KeyTip="C"
              UseSmallImage="True"
              Command="ApplicationCommands.Copy">
              <dc:ButtonDropDown.ToolTip>
                <dc:SuperToolTip
                  Header="Copy (Ctrl+C)">
                  <TextBlock
                    TextWrapping="Wrap"
                    Width="180">Copy the selection and put it on the Clipboard.</TextBlock>
                </dc:SuperToolTip>
              </dc:ButtonDropDown.ToolTip>
            </dc:ButtonDropDown>
            <dc:ButtonDropDown
              dc:Ribbon.KeyTip="D"
              UseSmallImage="True"
              Command="ApplicationCommands.Delete">
              <dc:ButtonDropDown.ToolTip>
              <dc:SuperToolTip
                Header="Delete">
                <TextBlock
                  TextWrapping="Wrap"
                  Width="180">
                    Clears the current selection.
                  </TextBlock>
                <dc:SuperToolTip.FooterImage>
                  <Image
                    Source="/Resources/Help16.png" />
                </dc:SuperToolTip.FooterImage>
                <dc:SuperToolTip.Footer>
                  <TextBlock
                    FontWeight="Bold"
                    Margin="3,0,0,0"
                    TextWrapping="Wrap">Press F1 for more help.</TextBlock>
                </dc:SuperToolTip.Footer>
              </dc:SuperToolTip>
              </dc:ButtonDropDown.ToolTip>
            </dc:ButtonDropDown>
          </dc:RibbonBar>
          <dc:RibbonBar
            Header="Editing"
            Name="EditingRibbonBar"
            ResizeOrderIndex="2"
            dc:Ribbon.KeyTip="E">
            <dc:RibbonBar.CollapsedImage>
              <Image
                Source="/Resources/Symbol32.png" />
            </dc:RibbonBar.CollapsedImage>
            <dc:ButtonDropDown
              dc:Ribbon.KeyTip="FD"
              Command="ApplicationCommands.Find"
              UseSmallImage="True" />
            <dc:ButtonDropDown
              dc:Ribbon.KeyTip="N"
              Command="{x:Static se:EditorCommands.FindNext}"
              UseSmallImage="True" />
            <dc:ButtonDropDown
              dc:Ribbon.KeyTip="D"
              Command="ApplicationCommands.Replace"
              UseSmallImage="True" />
          </dc:RibbonBar>
          <dc:RibbonBar
            Header="Database"
            x:Name="DatabaseRibbonBar"
            ResizeOrderIndex="3"
            dc:Ribbon.KeyTip="D">
            <dc:RibbonBar.CollapsedImage>
              <Image
                Source="/Resources/PADD.ico" />
            </dc:RibbonBar.CollapsedImage>
            <dc:RibbonBar.Resources>
              <Style
                TargetType="dc:ButtonDropDown">
                <Setter
                  Property="Padding"
                  Value="2,0,2,0" />
              </Style>
            </dc:RibbonBar.Resources>
            <dc:ButtonDropDown
              Header="Races"
              Command="{x:Static se:EditorWindow.RaceDatabaseCommand}"
              CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}"
              ImagePosition="Top"
              dc:RibbonBar.MinAutoSizeHint="Medium"
              ExpandPosition="Bottom"
              InlineExpand="False"
              PopupType="Menu"
              ContentExpands="True"
              Role="SplitButton"
              VerticalContentAlignment="Center"
              ToolTipService.PlacementTarget="{Binding ElementName=EditorRibbon}">
              <dc:ButtonDropDown.ToolTip>
                <dc:SuperToolTip
                  Header="Races">
                  <TextBlock
                    TextWrapping="Wrap">Opens the database of all races in Supremacy.</TextBlock>
                </dc:SuperToolTip>
              </dc:ButtonDropDown.ToolTip>
              <dc:ButtonDropDown
                Role="MenuItem"
                Command="{x:Static se:EditorCommands.NewRace}"
                CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}" />
              <!--<dc:ButtonDropDown Role="MenuItem"
                                 Header="Save the Race Database">
                <dc:ButtonDropDown.ToolTip>
                  <dc:SuperToolTip Header="Save the Race Database">
                    <TextBlock TextWrapping="Wrap">Commits only the changes made to the Race Database.  No other changes are saved.</TextBlock>
                  </dc:SuperToolTip>
                </dc:ButtonDropDown.ToolTip>
              </dc:ButtonDropDown>-->
            </dc:ButtonDropDown>
            <dc:ButtonDropDown
              Header="Factions"
              Command="{x:Static se:EditorWindow.CivDatabaseCommand}"
              CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}"
              ImagePosition="Top"
              dc:RibbonBar.MinAutoSizeHint="Medium"
              ExpandPosition="Bottom"
              InlineExpand="False"
              PopupType="Menu"
              ContentExpands="True"
              Role="SplitButton"
              VerticalContentAlignment="Center"
              ToolTipService.PlacementTarget="{Binding ElementName=EditorRibbon}">
              <dc:ButtonDropDown.ToolTip>
                <dc:SuperToolTip
                  Header="Factions">
                  <TextBlock
                    TextWrapping="Wrap">Opens the database of all Empires and Minor Powers in Supremacy.</TextBlock>
                </dc:SuperToolTip>
              </dc:ButtonDropDown.ToolTip>
              <dc:ButtonDropDown
                Role="MenuItem"
                Command="{x:Static se:EditorCommands.NewCiv}"
                CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}" />
              <!--<dc:ButtonDropDown Role="MenuItem"
                                 Header="Save the Faction Database">
                <dc:ButtonDropDown.ToolTip>
                  <dc:SuperToolTip Header="Save the Faction Database">
                    <TextBlock TextWrapping="Wrap">Commits only the changes made to the Faction Database.  No other changes are saved.</TextBlock>
                  </dc:SuperToolTip>
                </dc:ButtonDropDown.ToolTip>
              </dc:ButtonDropDown>-->
            </dc:ButtonDropDown>
            <dc:ButtonDropDown
              Header="Buildings"
              Command="{x:Static se:EditorWindow.BuildingDatabaseCommand}"
              CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}"
              ImagePosition="Top"
              dc:RibbonBar.MinAutoSizeHint="Medium"
              ExpandPosition="Bottom"
              InlineExpand="False"
              PopupType="Menu"
              ContentExpands="True"
              Role="SplitButton"
              VerticalContentAlignment="Center"
              ToolTipService.PlacementTarget="{Binding ElementName=EditorRibbon}">
              <dc:ButtonDropDown.ToolTip>
                <dc:SuperToolTip
                  Header="Buildings">
                  <TextBlock
                    TextWrapping="Wrap">Opens the database of all Buildings in Supremacy.</TextBlock>
                </dc:SuperToolTip>
              </dc:ButtonDropDown.ToolTip>
              <dc:ButtonDropDown
                Role="MenuItem"
                Command="{x:Static se:EditorCommands.NewBuilding}"
                CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}" />
              <dc:ButtonDropDown
                Role="MenuItem"
                Command="{x:Static se:EditorCommands.NewShipyard}"
                CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}" />
              <!--<dc:ButtonDropDown Role="MenuItem"
                                 Header="Save the Building Database">
                <dc:ButtonDropDown.ToolTip>
                  <dc:SuperToolTip Header="Save the Building Database">
                    <TextBlock TextWrapping="Wrap">Commits only the changes made to the Building Database.  No other changes are saved.</TextBlock>
                    <dc:SuperToolTip.Footer>
                      <TextBlock TextWrapping="Wrap"
                                 Margin="3,0,0,0"
                                 Text="Note: Shipyards are included in the Building Database." />
                    </dc:SuperToolTip.Footer>
                  </dc:SuperToolTip>
                </dc:ButtonDropDown.ToolTip>
              </dc:ButtonDropDown>-->
            </dc:ButtonDropDown>
            <dc:ButtonDropDown
              Header="Facilities"
              Command="{x:Static se:EditorWindow.FacilityDatabaseCommand}"
              CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}"
              ImagePosition="Top"
              dc:RibbonBar.MinAutoSizeHint="Medium"
              ExpandPosition="Bottom"
              InlineExpand="False"
              PopupType="Menu"
              ContentExpands="True"
              Role="SplitButton"
              VerticalContentAlignment="Center"
              ToolTipService.PlacementTarget="{Binding ElementName=EditorRibbon}">
              <dc:ButtonDropDown.ToolTip>
                <dc:SuperToolTip
                  Header="Facilities">
                  <TextBlock
                    TextWrapping="Wrap">Opens the database of all Facilities in Supremacy.</TextBlock>
                </dc:SuperToolTip>
              </dc:ButtonDropDown.ToolTip>
              <dc:ButtonDropDown
                Role="MenuItem"
                Command="{x:Static se:EditorCommands.NewFacility}"
                CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}" />
              <!--<dc:ButtonDropDown Role="MenuItem"
                                 Header="Save the Facility Database">
                <dc:ButtonDropDown.ToolTip>
                  <dc:SuperToolTip Header="Save the Facility Database">
                    <TextBlock TextWrapping="Wrap">Commits only the changes made to the Facility Database.  No other changes are saved.</TextBlock>
                  </dc:SuperToolTip>
                </dc:ButtonDropDown.ToolTip>
              </dc:ButtonDropDown>-->
            </dc:ButtonDropDown>
            <dc:ButtonDropDown
              Header="Ships"
              Command="{x:Static se:EditorWindow.ShipDatabaseCommand}"
              CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}"
              ImagePosition="Top"
              dc:RibbonBar.MinAutoSizeHint="Medium"
              ExpandPosition="Bottom"
              InlineExpand="False"
              PopupType="Menu"
              ContentExpands="True"
              Role="SplitButton"
              VerticalContentAlignment="Center"
              ToolTipService.PlacementTarget="{Binding ElementName=EditorRibbon}">
              <dc:ButtonDropDown.ToolTip>
                <dc:SuperToolTip
                  Header="Ships">
                  <TextBlock
                    TextWrapping="Wrap">Opens the database of all Ships in Supremacy.</TextBlock>
                </dc:SuperToolTip>
              </dc:ButtonDropDown.ToolTip>
              <dc:ButtonDropDown
                Role="MenuItem"
                Command="{x:Static se:EditorCommands.NewShip}"
                CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}" />
              <!--<dc:ButtonDropDown Role="MenuItem"
                                 Header="Save the Ship Database">
                <dc:ButtonDropDown.ToolTip>
                  <dc:SuperToolTip Header="Save the Ship Database">
                    <TextBlock TextWrapping="Wrap">Commits only the changes made to the Ship Database.  No other changes are saved.</TextBlock>
                  </dc:SuperToolTip>
                </dc:ButtonDropDown.ToolTip>
              </dc:ButtonDropDown>-->
            </dc:ButtonDropDown>
            <dc:ButtonDropDown
              Header="Stations"
              Command="{x:Static se:EditorWindow.StationDatabaseCommand}"
              CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}"
              ImagePosition="Top"
              dc:RibbonBar.MinAutoSizeHint="Medium"
              ExpandPosition="Bottom"
              InlineExpand="False"
              PopupType="Menu"
              ContentExpands="True"
              Role="SplitButton"
              VerticalContentAlignment="Center"
              ToolTipService.PlacementTarget="{Binding ElementName=EditorRibbon}">
              <dc:ButtonDropDown.ToolTip>
                <dc:SuperToolTip
                  Header="Stations">
                  <TextBlock
                    TextWrapping="Wrap">Opens the database of all Stations in Supremacy.</TextBlock>
                </dc:SuperToolTip>
              </dc:ButtonDropDown.ToolTip>
              <dc:ButtonDropDown
                Role="MenuItem"
                Command="{x:Static se:EditorCommands.NewStation}"
                CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}" />
              <!--<dc:ButtonDropDown Role="MenuItem"
                                 Header="Save the Station Database">
                <dc:ButtonDropDown.ToolTip>
                  <dc:SuperToolTip Header="Save the Station Database">
                    <TextBlock TextWrapping="Wrap">Commits only the changes made to the Station Database.  No other changes are saved.</TextBlock>
                  </dc:SuperToolTip>
                </dc:ButtonDropDown.ToolTip>
              </dc:ButtonDropDown>-->
            </dc:ButtonDropDown>
          </dc:RibbonBar>
        </dc:RibbonBarPanel>
      </dc:RibbonTab>
      <dc:ButtonDropDown
        Command="ApplicationCommands.Help"
        CommandTarget="{Binding Path=., RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type se:EditorWindow}}}"
        dc:RibbonTabPanel.PanelAlignment="Right"
        PartVisibility="ImageOnly"
        dc:Ribbon.KeyTip="H" />
    </dc:Ribbon>
    <StatusBar
      Name="StatusBar"
      DockPanel.Dock="Bottom">
      <StatusBar.ItemsPanel>
        <ItemsPanelTemplate>
          <DockPanel
            LastChildFill="True" />
        </ItemsPanelTemplate>
      </StatusBar.ItemsPanel>
      <StatusBarItem
        DockPanel.Dock="Left">
        Supremacy Editor
      </StatusBarItem>
      <!--<Separator Style="{DynamicResource {ComponentResourceKey TypeInTargetAssembly=dc:Ribbon, ResourceId=StatusBarSeparator}}"
                 DockPanel.Dock="Left" />
      <StatusBarItem Style="{DynamicResource {ComponentResourceKey TypeInTargetAssembly=dc:Ribbon, ResourceId=StatusBarItemAlt}}"
                     DockPanel.Dock="Right"
                     Padding="6,0,32,0"
                     Name="StatusBarItem">
        <Slider Width="128"
                Minimum="0.5"
                Maximum="2.0"
                SmallChange="0.01"
                LargeChange="0.1"
                IsMoveToPointEnabled="True"
                IsSnapToTickEnabled="False"
                Value="{Binding ElementName=EditorWindowScaleTransform, Path=ScaleX, Mode=TwoWay}" />
      </StatusBarItem>
      <StatusBarItem />-->
    </StatusBar>
    <dd:DockSite
      LicenseKey="DAD80300DA22"
      x:Name="EditorDock"
      Margin="4,0,4,0">
      <dd:DockSite.SplitPanels>
        <dd:SplitPanel
          x:Name="LeftSideSplitPanel"
          dd:DockSite.Dock="Left"
          dd:DockSite.DockSize="180"
          dd:DockSite.SaveLayout="True"
          Visibility="Visible">
          <dd:DockWindowGroup>
            <dd:DockWindow
              Header="Races"
              x:Name="RaceDatabaseDock"
              CanDockAsDocument="False"
              IsSelected="True"
              Visibility="Visible">
              <se:SelectionListView
                x:Name="RaceListView"
                DisplayMemberPath="Name"
                ItemsSource="{Binding Source={StaticResource RaceDatabaseView}}"
                SelectionActionRequested="RaceListView_SelectionActionRequested" />
            </dd:DockWindow>
            <dd:DockWindow
              Header="Factions"
              x:Name="CivDatabaseDock"
              CanDockAsDocument="True"
              Visibility="Visible">
              <se:SelectionListView
                x:Name="CivListView"
                DisplayMemberPath="Name"
                ItemsSource="{Binding Source={StaticResource CivDatabaseView}}"
                SelectionActionRequested="CivListView_SelectionActionRequested" />
            </dd:DockWindow>
          </dd:DockWindowGroup>
        </dd:SplitPanel>
        <dd:SplitPanel
          x:Name="RightSideSplitPanel"
          dd:DockSite.Dock="Right"
          dd:DockSite.DockSize="180"
          dd:DockSite.SaveLayout="True"
          Visibility="Visible">
          <dd:DockWindowGroup>
            <dd:DockWindow
              Header="Buildings"
              x:Name="BuildingDatabaseDock"
              CanDockAsDocument="False"
              IsSelected="True"
              Visibility="Visible">
              <se:SelectionListView
                x:Name="BuildingListView"
                DisplayMemberPath="Name"
                ItemsSource="{Binding Source={StaticResource BuildingDatabaseView}}"
                SelectionActionRequested="BuildingListView_SelectionActionRequested" />
            </dd:DockWindow>
            <dd:DockWindow
              Header="Facilities"
              x:Name="FacilityDatabaseDock"
              CanDockAsDocument="False"
              Visibility="Visible">
              <se:SelectionListView
                x:Name="FacilityListView"
                DisplayMemberPath="Name"
                ItemsSource="{Binding Source={StaticResource FacilityDatabaseView}}"
                SelectionActionRequested="FacilityListView_SelectionActionRequested" />
            </dd:DockWindow>
          </dd:DockWindowGroup>
          <dd:DockWindowGroup>
            <dd:DockWindow
              Header="Ships"
              x:Name="ShipDatabaseDock"
              CanDockAsDocument="False"
              IsSelected="True"
              Visibility="Visible">
              <se:SelectionListView
                x:Name="ShipListView"
                DisplayMemberPath="Name"
                ItemsSource="{Binding Source={StaticResource ShipDatabaseView}}"
                SelectionActionRequested="ShipListView_SelectionActionRequested" />
            </dd:DockWindow>
            <dd:DockWindow
              Header="Stations"
              x:Name="StationDatabaseDock"
              CanDockAsDocument="False"
              Visibility="Visible">
              <se:SelectionListView
                x:Name="StationListView"
                DisplayMemberPath="Name"
                ItemsSource="{Binding Source={StaticResource StationDatabaseView}}"
                SelectionActionRequested="StationListView_SelectionActionRequested" />
            </dd:DockWindow>
          </dd:DockWindowGroup>

        </dd:SplitPanel>
        <dd:SplitPanel
          dd:DockSite.Dock="Bottom"
          dd:DockSite.DockSize="100"
          dd:DockSite.SaveLayout="True"
          Visibility="Collapsed">
          <dd:DockWindowGroup
            dd:SplitPanel.RelativeSize="100,100">
            <dd:DockWindow
              Header="Output"
              x:Name="OutputDock">
              <TextBox
                x:Name="OutputText"
                IsReadOnly="True"
                VerticalScrollBarVisibility="Auto" />
            </dd:DockWindow>
          </dd:DockWindowGroup>
        </dd:SplitPanel>
      </dd:DockSite.SplitPanels>
      <dd:SplitPanel
        dd:DockSite.SaveLayout="True"
        dd:DockSite.IsDocument="True">
        <dd:DockWindowGroup
          x:Name="DocumentWindowGroup"
          dd:SplitPanel.RelativeSize="100,100">
        </dd:DockWindowGroup>
      </dd:SplitPanel>
    </dd:DockSite>
  </DockPanel>
</dc:RibbonWindow>
